<template>
  <el-table height="400" style="width: 100%" :data="TeacherData" >
    <el-table-column
        fixed="left"
        prop="teacherID"
        label="教师号"></el-table-column>
    <el-table-column
        prop="teacherName"
        label="教师名"></el-table-column>
    <el-table-column
        label="教师等级"
        prop="teacherLevel"></el-table-column>
    <el-table-column
        prop="teacherSpeciality"
        label="教师特长"> <el-button class="el-button">查看</el-button> </el-table-column>
    <el-table-column
        label="课程表"><el-button plain>查看课程表</el-button></el-table-column>
    <el-table-column
        label="修改"><el-button plain>修改</el-button></el-table-column>
  </el-table>

  <el-button type="primary" @click="addTeacher = true">新增教师</el-button>
  <el-button type="primary" @click="deleteTeacher = true">删除教师</el-button>
  <add-teacher v-bind:visible="addTeacher"></add-teacher>
  <delete-teacher v-bind:visible="deleteTeacher"></delete-teacher>
</template>

<script>
import AddTeacher from "../components/AddTeacherDialog.vue";
import {ref} from "vue";
import DeleteTeacher from "../components/DeleteTeacherDialog.vue";
export default {
  name: "TeacherManage",
  components: {DeleteTeacher, AddTeacher},
  setup() {
    let addTeacher = ref(false);
    let deleteTeacher = ref(false);
    return {
      // TeacherData: [
      //   {
      //     teacherID: 235435,
      //     teacherName: "李连杰",
      //     teacherLevel: 4,
      //     teacherSpeciality: "放屁+脚臭"
      //   },
      //     {
      //       teacherID: 235905,
      //       teacherName: "李清照",
      //       teacherLevel: 1,
      //       teacherSpeciality: "写诗"
      //     },
      //   {
      //     teacherID: 237439,
      //     teacherName: "成龙",
      //     teacherLevel: 7,
      //     teacherSpeciality: "放屁+脚臭"
      //   },
      //   {
      //     teacherID: 255980,
      //     teacherName: "洪金宝",
      //     teacherLevel: 6,
      //     teacherSpeciality: "放屁+脚臭"
      //   },
      //   {
      //     teacherID: 640256,
      //     teacherName: "周比利",
      //     teacherLevel: 2,
      //     teacherSpeciality: "放屁+脚臭"
      //   },
      //   {
      //     teacherID: 140678,
      //     teacherName: "邹兆龙",
      //     teacherLevel: 4,
      //     teacherSpeciality: "放屁+脚臭"
      //   }
      // ],
      addTeacher, deleteTeacher
    }
  }
}
</script>

<style scoped>

</style>